package com.whmnx.main.ui.model;

import android.text.Html;
import android.text.Spanned;

import androidx.annotation.NonNull;
import androidx.databinding.ObservableField;

import com.whmnx.base.bean.MsgBean;

import me.goldze.mvvmhabit.base.BaseViewModel;
import me.goldze.mvvmhabit.base.ItemViewModel;

/**
 * author : huang
 * date   : 2020/9/25 0025 18:27
 * version: 1.0
 */
public class MsgItemViewModel extends ItemViewModel {  //ManagementModel viewModel, ProductBean productBean

    public ObservableField<String> Message_Title = new ObservableField<>("");
    public ObservableField<String> Message_Content = new ObservableField<>("");

    public MsgItemViewModel(@NonNull BaseViewModel viewModel, MsgBean msgBean) {
        super(viewModel);
        Message_Title.set(msgBean.getMessage_Title());
        Message_Content.set(msgBean.getMessage_Title());

      //  URLImageParser imageGetter = new URLImageParser(tv);
        //注意添加Internet权限
        final Spanned sp = Html.fromHtml(msgBean.getMessage_Content());
      //  Message_Content.set(sp);
    }
}
